﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core;
using Cofe.Web.Interfaces;

namespace Cofe.Web
{
    public static class IHttpMessageFormatterManagerExtension
    {
        public static T CreateRequestObject<T>(this IHttpMessageFormatterManager manager,
            HttpRequestMessage request, ParameterDic parameters = null)
        {
            return (T)manager.CreateRequestObject(request, typeof(T), parameters);
        }

    }
}
